<?php
	@header("content-Type: text/html; charset=utf-8");	
	require_once "inc/pigm.function.php";
	require_once "inc/xmldb.class.php";
	require_once("inc/runtimer.class.php");
	require_once("inc/db.config.php");
	
	//实例化xml数据库类
	$tagsDB = new xmlDB($DBset_tags);
	$musicDB = new xmlDB($DBset_music);


	if($_GET['act']=="getlist"){//输出播放列表
		foreach ($musicDB->GetList("","all") as $k=>$v){
			echo "<li><a href=\"javascript:void(null);\" _mid=\"".$v['id']."\">".$v['music']." - ".$v['author']."</a></li>";
		}
		exit;
	}
	
	if($_GET['act']=="geturl"){//按ID输出音乐地址
		$row = $musicDB->GetOneByID($_GET['id']);
		echo "url=".urldecode($row['url']);
		exit;
	}
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pig Flash Music Player</title>
<link href="inc/style.css" rel="stylesheet" type="text/css" />
<script src="inc/jquery.js" type="text/javascript" language="javascript"></script>
<script src="inc/player.js" type="text/javascript" language="javascript"></script>
</head>
<body>
	<div class="left">
		<div class="play_state">
			<div style="float:left;">
				<span class="pmp_musicinfo"></span>
			</div>
			<div style="float:right">
				<span class="pmp_state"></span> : <span class="pmp_playtime"></span>
			</div>
		</div>
    	<div class="player">
			<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="PigM_Player" width="324" height="34" align="middle">
				<param name="allowScriptAccess" value="sameDomain" />
				<param name="movie" value="mp.swf?autoplay=true" />
				<param name="quality" value="high" />
				<param name="bgcolor" value="#222222" />
				<embed src="mp.swf" quality="high" bgcolor="#222222" width="324" height="34" swLiveConnect=true id="PigM_Player" name="PigM_Player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
			</object>
			<div class="PigM_StBox" style="display:none;"></div>
			<span id="PigM_lrc" style="display:none;"></span>
		</div>
		
		
		<div class="mbox">
			<dl>
				<dt></dt>
				<dd>
					<ul class="mlist">

					</ul>
				</dd>
			</dl>
			
			
			<dl>
				<dt></dt>
				<dd class="debug">
				
				</dd>
			</dl>
		</div>

    </div>
</body>
</html>